package cn.yunyichina.provider.pay.validation;

import lombok.Getter;
import lombok.Setter;
import org.hibernate.validator.constraints.Email;
import org.hibernate.validator.constraints.NotBlank;
import org.hibernate.validator.constraints.NotEmpty;
import org.hibernate.validator.constraints.Range;

/**
 * Created by Lullaby on 2017/9/27
 */
@Getter
@Setter
class Foo {

    @NotBlank
    private String username;

    @Range(groups = Adult.class, min = 18, max = 256)
    private int age;

    @Email
    @NotEmpty(message = "email may be not empty")
    private String email;

    interface Adult{}

}
